# Echo server program
import socket, sys
class UDPServer:
	def __init__(self, Host, Port):
		self.Host, self.Port = Host, Port
		print str(self.Host) + str(self.Port)
		s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
		s.bind((self.Host, self.Port))
		s.listen(1)
		conn, addr = s.accept()
		print 'Connected by', addr
		while 1:
			#data = conn.recv(1024)
			#if not data:
			#	break
			#if data.strip() == 'QUIT':
			#	break
			infile = open("house.asf","r")
			while infile:
				line=infile.read(1024)
				conn.send(line)
				sys.stdout.write('.')
			conn.close()

server=UDPServer('',50000)
